S = SearchForest2( [([i],i, i) for i in range(1,20)],   # root
    lambda (list, sum, last): [(list + [i], sum + i, i) for i in range(1,last)], # children
    lambda x: x,                                   # post-process
    lambda (li, sum, _): var('y')**sum,            # statistic
    lambda x,y: x + y,                             # reduce_function
    0 )                                            # reduce_init
